from django.contrib import admin
from booktest.models import BookInfo, HeroInfo


# Register your models here.

# 自定义模型管理类
class BookInfoAdmin(admin.ModelAdmin):
    '''图书模型管理类'''
    list_display = ['id', 'btitle', 'bpub_date']  # 使后台数据按行显示


class HeroInfoAdmin(admin.ModelAdmin):
    '''图书模型管理类'''
    list_display = ['hname', 'hgender', 'hcomment', 'hbook']  # 使后台数据按行显示


# 注册模型类
admin.site.register(BookInfo, BookInfoAdmin)
admin.site.register(HeroInfo, HeroInfoAdmin)
